/* 
 * File:   ServiceLocator.h
 * Author: alexey
 *
 * Created on 31 Март 2011 г., 1:41
 */

#ifndef ServiceLocator_H
#define	ServiceLocator_H
#include <IServiceLocator.h>
#include <map>
#include <string>
namespace storagemon
{

    class ServiceLocator : public IServiceLocator
    {
    public:
        ServiceLocator(IServiceLocator *service_locator);
        virtual ~ServiceLocator();
        void RegisterService(const char* service_name,
                IService* service);
        void UnregisterService(const char* service_name);
        IService* GetService(const char* service_name);
    private:
        IServiceLocator *m_sl;
        std::map<std::string, IService*> m_services;
    };
} // storagemon

#endif	/* ServiceLocator_H */

